﻿package mortal.game.view.copy.worldBoss.WorldBossAllot
{
    import Message.Public.*;
    import com.mui.controls.*;
    import extend.language.*;
    import mortal.common.global.*;
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class WorldBossDiceCellRenderer extends GCellRenderer
    {
        protected var _name:GTextFiled;
        protected var _diceNum:GTextFiled;

        public function WorldBossDiceCellRenderer()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._name = UIFactory.gTextField("", 43, 5, 100, 24, this, GlobalStyle.textFormatBai);
            this._diceNum = UIFactory.gTextField("", 242, 5, 100, 24, this, GlobalStyle.textFormatBai);
            pushUIToDisposeVec(UIFactory.bg(0, 31, 333, 2, this, ImagesConst.SplitLine));
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._name.dispose();
            this._name = null;
            this._diceNum.dispose();
            this._diceNum = null;
            super.disposeImpl(param1);
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            var _loc_2:SGuildItemDiceUpdateInfo = null;
            super.data = param1;
            _loc_2 = param1 as SGuildItemDiceUpdateInfo;
            if (_loc_2.playerName == Cache.instance.role.entityInfo.name)
            {
                this._name.htmlText = "<font color=\'#1ccc31\'>" + _loc_2.playerName + "</font>";
                this._diceNum.htmlText = "<font color=\'#1ccc31\'>" + _loc_2.dice + Language.getString(21460) + "</font>";
            }
            else
            {
                this._name.text = _loc_2.playerName;
                this._diceNum.text = _loc_2.dice + Language.getString(21460);
            }
            return;
        }// end function

    }
}
